﻿@{
    Layout = "";
}
@model CAF.WebSite.Sms.Models.SmsModel

<div class="alert alert-info">
	<button class="close" data-dismiss="alert">×</button>
	@Html.Raw(@T("Plugins.Sms.Clickatell.AdminInstruction"))
</div>

@using (Html.BeginForm())
{
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.LangLabelFor(model => model.Enabled)
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Enabled)
                @Html.ValidationMessageFor(model => model.Enabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.LangLabelFor(model => model.PhoneNumber)
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.PhoneNumber)
                @Html.ValidationMessageFor(model => model.PhoneNumber)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.LangLabelFor(model => model.ApiId)
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ApiId)
                @Html.ValidationMessageFor(model => model.ApiId)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.LangLabelFor(model => model.Username)
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Username)
                @Html.ValidationMessageFor(model => model.Username)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.LangLabelFor(model => model.Password)
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Password)
                @Html.ValidationMessageFor(model => model.Password)
            </td>
        </tr>
        <tr>
			<td class="adminTitle">
				&nbsp;
			</td>
			<td class="adminData">
                <button type="submit" name="save" value="save" class="btn btn-primary">
					<i class="fa fa-check"></i>&nbsp;@T("Admin.Common.Save")
                </button>
            </td>
        </tr>
        <tr>
            <td colspan="2">
				<div class="caption-container">
					<h3 class="bordered">@T("Plugins.Sms.Clickatell.SendTest.Hint")</h3>
				</div>
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.LangLabelFor(model => model.TestMessage)
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.TestMessage)
                @Html.ValidationMessageFor(model => model.TestMessage)
            </td>
        </tr>
 
    </table>
    <div class="row">
        <div class="portlet">
            <div class="portlet-body form">
                <div class="form-horizontal  form-body">
                    <div class="form-group">
                        <label class="control-label col-md-3">@Html.LangLabelFor(model => model.Enabled)</label>
                        <div class="col-md-3">
                            @Html.EditorFor(model => model.Enabled)
                            @Html.ValidationMessageFor(model => model.Enabled)
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3"></label>
                        <div class="col-md-3">
                            <button type="submit" name="test-sms" value="test-sms" class="btn">
                                <i class="fa fa-envelope"></i>&nbsp;@T("Plugins.Sms.Clickatell.SendTest")
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    if (!String.IsNullOrEmpty(Model.TestSmsResult))
    {
		<div class="alert alert-info">
			<button class="close" data-dismiss="alert">×</button>
			@Model.TestSmsResult
        </div>
    }
}